project(newfund)

include_directories(./)
include_directories(./include)
include_directories(D:/CPP/wxWidgets/include)
include_directories(D:/CPP/wxWidgets/lib/gcc_dll/mswu)
link_directories(D:/CPP/wxWidgets/lib/gcc_dll)
link_directories(D:/CPP/ThreeLib/shapelib-1.5.0/dll)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -finput-charset=UTF-8")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fexec-charset=gbk")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mwindows")

aux_source_directory(${CMAKE_CURRENT_SOURCE_DIR}/src SRC_LIST)

add_executable(${PROJECT_NAME} ${SRC_LIST} logo.rc)

target_link_libraries(${PROJECT_NAME} 
        wxbase32u
        wxbase32u_net
        wxbase32u_xml
        wxexpat
        wxjpeg
        wxmsw32u_adv
        wxmsw32u_aui
        wxmsw32u_core
        wxmsw32u_gl
        wxmsw32u_html
        wxmsw32u_media
        wxmsw32u_propgrid
        wxmsw32u_ribbon
        wxmsw32u_richtext
        wxmsw32u_stc
        wxmsw32u_webview
        wxmsw32u_xrc
        wxpng
        wxregexu
        wxscintilla
        wxtiff
        wxzlib
        shp.dll
    )

#通过STRIP减少文件大小
add_custom_command(
    TARGET 
    ${PROJECT_NAME} 
    POST_BUILD
    COMMAND echo "add strip"
    COMMAND ${CMAKE_STRIP} "${PROJECT_NAME}.exe"
)